import axios from 'axios';
export const getCityConfigList = async () => {
    try {
        const response = await axios.get('/region/getList');
        return response.data;
    } catch (error) {
        console.error('获取城市列表失败', error);
        return { success: false, message: '获取城市列表失败' };
    }
}
export const saveCityConfig = async (data: any) => {
    try {
        const response = await axios.post('/region/saveRegion', data);
        return response;
    } catch (error) {
        console.error('保存城市失败', error);
        return { success: false, message: '保存城市失败' };
    }
}
export const deleteCityConfig = async (id: number) => {
    try {
        const response = await axios.delete(`/region/getDetail`,{params:{id:id}});
        return response.data;
    } catch (error) {
        console.error('删除城市失败', error);
        return { success: false, message: '删除城市失败' };
    }
}